Skip to content

Commit d21ba5a

Browse files
Merge pull request #11 from Patitotective/devel
2 parents 923cbb3 + c070cc3 commit d21ba5a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

ImThemes.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Package
22

3-
version = "0.2.3"
3+
version = "0.2.5"
44
author = "Patitotective"
55
description = "ImThemes is a Dear ImGui theme designer and browser written in Nim"
66
license = "MIT"

config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# App
22
name = "ImThemes"
33
comment = "ImThemes is a Dear ImGui theme designer and browser written in Nim"
4-
version = "0.2.3"
4+
version = "0.2.5"
55
website = "https://github.com/Patitotective/ImThemes"
66
authors = ["Patitotective <https://github.com/Patitotective>"]
77
categories = ["Utility"]

main.nim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,14 @@ proc drawMain(app: var App) = # Draw the main window
203203
igEnd()
204204

205205
# GLFW clipboard -> ImGui clipboard
206-
if not app.win.getClipboardString().isNil and $app.win.getClipboardString() != app.lastClipboard:
207-
igsetClipboardText(app.win.getClipboardString())
208-
app.lastClipboard = $app.win.getClipboardString()
206+
if (let clip = app.win.getClipboardString(); not clip.isNil and $clip != app.lastClipboard):
207+
igSetClipboardText(clip)
208+
app.lastClipboard = $clip
209209

210210
# ImGui clipboard -> GLFW clipboard
211-
if not igGetClipboardText().isNil and $igGetClipboardText() != app.lastClipboard:
212-
app.win.setClipboardString(igGetClipboardText())
213-
app.lastClipboard = $igGetClipboardText()
211+
if (let clip = igGetClipboardText(); not clip.isNil and $clip != app.lastClipboard):
212+
app.win.setClipboardString(clip)
213+
app.lastClipboard = $clip
214214

215215
proc render(app: var App) = # Called in the main loop
216216
# Poll and handle events (inputs, window resize, etc.)

0 commit comments

Comments
 (0)