Skip to content

Commit ebd300b

Browse files
committed
Fix: the second color 1. does not get copied when teradic/monochromatic is selected 2. gets copied twice when analogous/complementary is selected
1 parent d995c9c commit ebd300b

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/window.vala

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -515,18 +515,16 @@ namespace Colorway {
515515
string export_txt = "";
516516

517517
export_txt += box.hex + "\n";
518-
519-
switch (color_rule_dropdown.get_selected ()) {
520-
case 2:
521-
export_txt += sbox.hex + "\n";
522-
break;
523-
default:
524-
export_txt += tbox.hex + "\n";
525-
break;
518+
export_txt += sbox.hex + "\n";
519+
520+
uint selected = color_rule_dropdown.get_selected ();
521+
if (selected == 2) {
522+
export_txt += tbox.hex + "\n";
523+
} else if (selected >= 3) {
524+
export_txt += tbox.hex + "\n";
525+
export_txt += ubox.hex + "\n";
526526
}
527527

528-
export_txt += ubox.hex + "\n";
529-
530528
// Put this ext_txt in clipboard
531529
var display = Gdk.Display.get_default ();
532530
unowned var clipboard = display.get_clipboard ();
@@ -572,4 +570,4 @@ namespace Colorway {
572570
about.present ();
573571
}
574572
}
575-
}
573+
}

0 commit comments

Comments
 (0)