1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

When the palette, outline and rotate image dialogs are open, the user can't zoom in the canvas anymore.

This commit is contained in:
OverloadedOrama 2020-04-07 18:13:35 +03:00
parent f5ab5c3987
commit 83188a54d9
6 changed files with 21 additions and 2 deletions

View file

@ -39,6 +39,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Chinese characters not being rendered in notifications (the labels that appear when undoing/redoing) and at the splash screen for Platinum & Gold Sponsor Placeholder labels
- Fixed issue when moving frames, the current frame was being shown but the frame next to it was actually the one being drawn on.
- Fixed issue with LineEdits not letting go of focus when the user clicked somewhere else - Thanks to Gaarco! (Issue #167)
- When the palette, outline and rotate image dialogs are open, the user can't zoom in the canvas anymore.
## [v0.6.2] - 17-02-2020

View file

@ -1260,6 +1260,7 @@ visible = false
[connection signal="popup_hide" from="ExportDialog" to="." method="_can_draw_true"]
[connection signal="popup_hide" from="ScaleImage" to="." method="_can_draw_true"]
[connection signal="popup_hide" from="PreferencesDialog" to="." method="_can_draw_true"]
[connection signal="popup_hide" from="RotateImage" to="." method="_can_draw_true"]
[connection signal="popup_hide" from="OutlineDialog" to="." method="_can_draw_true"]
[connection signal="popup_hide" from="AboutDialog" to="." method="_can_draw_true"]
[connection signal="confirmed" from="UnsavedCanvasDialog" to="." method="_on_UnsavedCanvasDialog_confirmed"]
@ -1270,6 +1271,7 @@ visible = false
[connection signal="custom_action" from="QuitAndSaveDialog" to="." method="_on_QuitAndSaveDialog_custom_action"]
[connection signal="popup_hide" from="QuitAndSaveDialog" to="." method="_can_draw_true"]
[connection signal="confirmed" from="NewPaletteDialog" to="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_new_palette_confirmed"]
[connection signal="popup_hide" from="NewPaletteDialog" to="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_NewPaletteDialog_popup_hide"]
[connection signal="file_selected" from="PaletteImportFileDialog" to="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_palette_import_file_selected"]
[editable path="BrushesPopup/TabContainer/File/FileBrushContainer/CircleBrushButton"]

View file

@ -30,8 +30,10 @@ margin_bottom = 462.0
size_flags_vertical = 3
[node name="EditPaletteColorPicker" type="ColorPicker" parent="VBoxContainer/HBoxContainer"]
margin_right = 308.0
margin_bottom = 462.0
margin_left = 4.0
margin_top = 4.0
margin_right = 4.0
margin_bottom = 4.0
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"]
margin_left = 312.0
@ -196,6 +198,7 @@ margin_left = 423.0
margin_right = 580.0
margin_bottom = 20.0
size_flags_horizontal = 3
[connection signal="popup_hide" from="." to="." method="_on_EditPalettePopup_popup_hide"]
[connection signal="color_changed" from="VBoxContainer/HBoxContainer/EditPaletteColorPicker" to="." method="_on_EditPaletteColorPicker_color_changed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/VBoxContainer/CenterContainer/HBoxContainer/LeftColor" to="." method="_on_LeftColor_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/VBoxContainer/CenterContainer/HBoxContainer/RightColor" to="." method="_on_RightColor_pressed"]

View file

@ -357,6 +357,7 @@ func image_menu_id_pressed(id : int) -> void:
var image : Image = Global.canvas.layers[Global.current_layer][0]
$RotateImage.set_sprite(image)
$RotateImage.popup_centered()
Global.can_draw = false
5: # Invert Colors
var image : Image = Global.canvas.layers[Global.current_layer][0]
Global.canvas.handle_undo("Draw")
@ -381,6 +382,7 @@ func image_menu_id_pressed(id : int) -> void:
Global.canvas.handle_redo("Draw")
7: # Outline
$OutlineDialog.popup_centered()
Global.can_draw = false
func help_menu_id_pressed(id : int) -> void:
match id:

View file

@ -22,6 +22,7 @@ func open(palette : String) -> void:
if Global.palettes.has(palette):
working_palette = Global.palettes[palette].duplicate()
_display_palette()
Global.can_draw = false
self.popup_centered()
left_color_button.modulate = Global.left_color_picker.color
@ -148,3 +149,7 @@ func _on_LeftColor_pressed() -> void:
func _on_RightColor_pressed() -> void:
color_picker.color = Global.right_color_picker.color
_on_EditPaletteColorPicker_color_changed(color_picker.color)
func _on_EditPalettePopup_popup_hide() -> void:
Global.can_draw = true

View file

@ -63,6 +63,7 @@ func on_palette_import_file_selected(path : String) -> void:
Global.error_dialog.popup_centered()
func _on_AddPalette_pressed() -> void:
Global.can_draw = false
Global.add_palette_button.get_child(0).popup(Rect2(Global.add_palette_button.rect_global_position, Vector2.ONE))
func on_new_palette_confirmed() -> void:
@ -119,6 +120,7 @@ func on_edit_palette() -> void:
Global.new_palette_dialog.window_title = "Create a new custom palette from existing default?"
Global.new_palette_name_line_edit.text = "Custom_" + current_palette
Global.new_palette_dialog.popup_centered()
Global.can_draw = false
else:
from_palette = null
Global.edit_palette_popup.open(current_palette)
@ -193,3 +195,7 @@ func get_palette_files(path : String) -> Array:
func save_palette(palette_name : String, filename : String) -> void:
var palette = Global.palettes[palette_name]
palette.save_to_file(palettes_path.plus_file(filename))
func _on_NewPaletteDialog_popup_hide() -> void:
Global.can_draw = true