Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #131 from tokejepsen/feature/activate_window
Browse files Browse the repository at this point in the history
Feature/activate window
  • Loading branch information
mkolar authored May 25, 2020
2 parents 0a409f5 + e000176 commit fa8f9fb
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
4 changes: 4 additions & 0 deletions avalon/tools/creator/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,3 +641,7 @@ def show(debug=False, parent=None):
window.show()

module.window = window

# Pull window to the front.
module.window.raise_()
module.window.activateWindow()
4 changes: 4 additions & 0 deletions avalon/tools/loader/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,10 @@ def show(debug=False, parent=None, use_context=False):

module.window = window

# Pull window to the front.
module.window.raise_()
module.window.activateWindow()


def cli(args):

Expand Down
4 changes: 4 additions & 0 deletions avalon/tools/projectmanager/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ def show(root=None, debug=False, parent=None):

module.window = window

# Pull window to the front.
module.window.raise_()
module.window.activateWindow()


def cli(args):
import argparse
Expand Down
8 changes: 7 additions & 1 deletion avalon/tools/sceneinventory/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ def select_items_by_action(self, object_names, options=None):
name = item.get("objectName")
if name in object_names:
self.scrollTo(item) # Ensure item is visible
selection_model.select(item, select_mode)
flags = select_mode | selection_model.Rows
selection_model.select(item, flags)

object_names.remove(name)

if len(object_names) == 0:
Expand Down Expand Up @@ -1797,3 +1799,7 @@ def show(root=None, debug=False, parent=None):
window.refresh()

module.window = window

# Pull window to the front.
module.window.raise_()
module.window.activateWindow()
9 changes: 7 additions & 2 deletions avalon/tools/workfiles/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,8 @@ def open_file(self, filepath):
pass

self._enter_session()
return host.open_file(filepath)
host.open_file(filepath)
self.window().close()

def save_changes_prompt(self):
self._messagebox = QtWidgets.QMessageBox()
Expand Down Expand Up @@ -605,7 +606,7 @@ def on_open_pressed(self):
print("No file selected to open..")
return

return self.open_file(path)
self.open_file(path)

def on_browse_pressed(self):

Expand Down Expand Up @@ -917,3 +918,7 @@ def show(root=None, debug=False, parent=None, use_context=True):
window.setStyleSheet(style.load_stylesheet())

module.window = window

# Pull window to the front.
module.window.raise_()
module.window.activateWindow()

0 comments on commit fa8f9fb

Please sign in to comment.