DiskUsage: Open file/folder on cmd-click, zoom on regular click.
This commit is contained in:
parent
eef00544a4
commit
5443e035e8
@ -243,11 +243,21 @@ PieView::MouseDown(BPoint where)
|
||||
void
|
||||
PieView::MouseUp(BPoint where)
|
||||
{
|
||||
// If the primary button was released and there was no dragging happening,
|
||||
// just zoom in or out.
|
||||
if (fClicked && !fDragging) {
|
||||
// The primary mouse button was released and there's no dragging happening.
|
||||
FileInfo* info = _FileAt(where);
|
||||
if (info != NULL) {
|
||||
BMessage* current = Window()->CurrentMessage();
|
||||
|
||||
uint32 modifiers;
|
||||
if (current->FindInt32("modifiers", (int32*)&modifiers) != B_OK)
|
||||
modifiers = 0;
|
||||
|
||||
if ((modifiers & B_COMMAND_KEY) != 0) {
|
||||
// launch the app on command-click
|
||||
_Launch(info);
|
||||
} else {
|
||||
// zoom in or out
|
||||
if (info == fScanner->CurrentDir()) {
|
||||
fScanner->ChangeDir(info->parent);
|
||||
fLastWhere = where;
|
||||
@ -261,6 +271,7 @@ PieView::MouseUp(BPoint where)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fClicked = false;
|
||||
fDragging = false;
|
||||
|
Loading…
Reference in New Issue
Block a user