mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-02 12:26:45 +00:00
remember showtxhex for new tabs
This commit is contained in:
parent
7bbbc10c61
commit
b420705db4
2 changed files with 6 additions and 0 deletions
|
@ -42,6 +42,8 @@ public class AppController implements Initializable {
|
|||
@FXML
|
||||
private TabPane tabs;
|
||||
|
||||
public static boolean showTxHexProperty;
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
|
||||
|
@ -78,6 +80,7 @@ public class AppController implements Initializable {
|
|||
});
|
||||
|
||||
showTxHex.setSelected(true);
|
||||
showTxHexProperty = true;
|
||||
}
|
||||
|
||||
public void openFromFile(ActionEvent event) {
|
||||
|
@ -167,6 +170,7 @@ public class AppController implements Initializable {
|
|||
public void showTxHex(ActionEvent event) {
|
||||
CheckMenuItem item = (CheckMenuItem)event.getSource();
|
||||
EventManager.get().post(new TransactionTabChangedEvent(tabs.getSelectionModel().getSelectedItem(), item.isSelected()));
|
||||
showTxHexProperty = item.isSelected();
|
||||
}
|
||||
|
||||
public void openExamples(ActionEvent event) {
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.sparrowwallet.drongo.protocol.*;
|
|||
import com.sparrowwallet.drongo.psbt.PSBT;
|
||||
import com.sparrowwallet.drongo.psbt.PSBTInput;
|
||||
import com.sparrowwallet.drongo.psbt.PSBTOutput;
|
||||
import com.sparrowwallet.sparrow.AppController;
|
||||
import com.sparrowwallet.sparrow.EventManager;
|
||||
import com.sparrowwallet.sparrow.event.TransactionChangedEvent;
|
||||
import com.sparrowwallet.sparrow.event.TransactionTabChangedEvent;
|
||||
|
@ -56,6 +57,7 @@ public class TransactionController implements Initializable {
|
|||
|
||||
private void initializeView() {
|
||||
initializeTxTree();
|
||||
transactionMasterDetail.setShowDetailNode(AppController.showTxHexProperty);
|
||||
refreshTxHex();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue